libxc/x86: fix mapping of the start_info area
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 28 Mar 2018 11:55:15 +0000 (12:55 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 28 Mar 2018 12:54:46 +0000 (13:54 +0100)
commitd00385d80f151ee17eba35064a85769338ad6a74
treea7ac71e8c0352edb96e35a69dced3b0b846dc210
parentcfc1fd0f522c655903b7c506d766680a0ff366c4
libxc/x86: fix mapping of the start_info area

The start_info size calculated in bootlate_hvm is wrong. It should use
HVMLOADER_MODULE_MAX_COUNT instead of dom->num_modules and it doesn't
take into account the size of the modules command line.

This is not a problem so far because the actually used amount of
memory doesn't cross a page boundary, and so no page-fault is
triggered.

Instead of fixing the size calculation done in bootlate_hvm just map
the amount of memory allocated in alloc_magic_pages_hvm.

Suggested-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_dom_x86.c